/*
 *  Copyright (C) 2015 The yuhaiyang Android Source Project
 *
 *  Licensed under the yuhaiyang License, (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *       https://coding.net/yuhaiyang/License.git
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 *  @author: y.haiyang@qq.com
 *
 */

package com.yuhaiyang.xmlparser;

import java.io.InputStream;
import java.util.List;

public interface IBookParser {
    /**
     * 解析输入流 得到Book对象集合
     * @param is
     * @return
     * @throws Exception
     */
    public List<Book> parse(InputStream is) throws Exception;

    /**
     * 序列化Book对象集合 得到XML形式的字符串
     * @param books
     * @return
     * @throws Exception
     */
    public String write(List<Book> books) throws Exception;
}
